package cn.myjerry.sort.refType;

/**
 * 商品实体类
 * @author Jerry
 *
 */

public class Goods {
	//商品名称
	private String name;
	//商品价格
	private double price;
	//商品收藏量
	private int fav;
	
	public Goods() {
	}

	public Goods(String name, double price, int fav) {
		super();
		this.name = name;
		this.price = price;
		this.fav = fav;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

	/**
	 * @return the fav
	 */
	public int getFav() {
		return fav;
	}

	/**
	 * @param fav the fav to set
	 */
	public void setFav(int fav) {
		this.fav = fav;
	}
	
	@Override
	public String toString() {
		return "商品名称："+this.name+"，商品价格："+this.price+"，商品收藏量："+this.fav+"\n";
	}
	
}
